package day03;

import java.util.Scanner;

public class IfDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入您的消费金额");
        Double price = scanner.nextDouble();

        if(price >= 500){
            System.out.println("您的消费已满500元享有8折优惠您需要支付"+(price *= 0.8)+"元");
        }else {
            System.out.println("您的消费未满500元无法享受折扣您需要支付"+price+"元");
        }



        System.out.println("请输入您的成绩");
        double score = scanner.nextDouble();
        if(score <= 100 && score >= 0){
            System.out.println("您的成绩是"+score);
        }else {
            System.out.println("您输入的成绩不合法请重新输入");
        }

    }
}
